﻿using System;
using System.Reflection;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using AnyOffice.Components;
using AnyOffice.DAL;
using log4net;
namespace AnyOffice.general.mytable
{
    public partial class url : System.Web.UI.UserControl
    {
        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SqlConnection conn = new SqlConnection(ConfigManager.ConnectionString);
                UrlDao dao = new UrlDao();
                DataTable table = dao.SelectAll(conn, HttpContext.Current.User.Identity.Name);
                DataView defaultView = table.DefaultView;
                this.rptPerson.DataSource = table;
                this.rptPerson.DataBind();
                DataTable table2 = dao.SelectAll(conn, "");
                this.rptPublic.DataSource = table2;
                this.rptPublic.DataBind();
                conn.Close();
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("桌面常用网址用户控件", exception);
                }
            }
        }

    }
}